Modern printers (e.g., laser and inkjet) receive image data from a host processor and convert that data, via a number of steps, into a multi-pixel raster representation. The raster representation is then fed to a print engine, such as a laser printer or an inkjet printhead, for rendering onto a media sheet. The most widely used printers today require only one bit per pixel. Conversion of image data from a host processor into a binary pixel image requires the implementation of certain raster operations to achieve a combination of patterns, text, and raster graphics. Certain raster operations employ logical operators which logically combine two or more input values to achieve a pixel result. So long as raster operations are performed on binary pixel representations, logical binary operators are perfectly satisfactory and enable the print image preparation procedure to operate at high speed.
Recently, color printers, both laser and ink jet, have entered the marketplace and represent each pixel, not by a binary value, but rather by a combination of multi-bit values which represent colors that can be combined to render a multiplicity of different color combinations. To conserve memory space and improve the speed of logical operations, individual color values are generally constrained to eight or less (e.g., four) bits each. Each color pixel is then represented by three multi-bit values designating the intensity of three primary colors.
To perform raster operations on multi-bit per pixel color images, the prior art has employed both binary operators and arithmetic operators. The binary operators comprise the known AND, OR, NOT and XOR functions. The corresponding arithmetic operators are shown in Table I below.
TABLE 1 ______________________________________ Binary and Arithmetic Operations Pixel Operation Binary Operator Arithmetic Operator ______________________________________ P.sub.0 AND P.sub.1 P.sub.0 .LAMBDA. P.sub.1 MIN(P.sub.0, P.sub.1) P.sub.0 OR P.sub.1 P.sub.0 v P.sub.1 MAX(P.sub.0, P.sub.1) NOT P.sub.0 - P.sub.0 MAX.sub.-- PIXEL.sub.-- VAL - P.sub.0 P.sub.0 XOR P.sub.1 P.sub.0 X P.sub.1 ABS(P.sub.0 - P.sub.1) ______________________________________
Upon first examination, while it would appear that binary and arithmetic operators render the same output, such is not always the case. To understand this, assume the presence of two 4-bit pixel values, one having the value of 1000 (binary) and the other having the value 0111 (binary). Further, assume that a color being represented by these two pixels is black and that the maximum value for a black pixel is 16 (or 2.sup.4). Using the AND binary operator between these two medium black pixels yields a result of 0. Using an AND arithmetic operator between the same two pixels yields a result of 0111, which is the expected result.
Table 2 below further contrasts the difference between binary and arithmetic operators for multi-bit pixels.
TABLE 2 ______________________________________ Binary vs. Arithmetic Usage Binary Arithmetic Pixel Operator Operator Which Operation Results Results Correct? ______________________________________ 1000 AND 0111 0000 0111 0111 0101 OR 1010 1111 1010 1111 NOT b.sub.1 b.sub.2 b.sub.3 b.sub.4 Result the same 1001 XOR 0111 1110 0010 0010 ______________________________________
Table 2 shows that there is a definite difference between operators in the multi-bit case. The problem with many printers that employ both binary and color imaging is that such printers often solely utilize binary operators which inherently operate on one bit at a time. Multi-bit data collects bits into pixel values, which binary operators are unable to preserve in all but extreme cases.
It is clear that to achieve a best image representation, that multi-bit pixels require arithmetic operators when raster operations are performed. The problem with support by a printer of arithmetic operators is their impact on performance of the printer. Arithmetic operators consume much more processor time than their binary counterparts. Table 3 below shows this difference for an exemplary instruction speed.
TABLE 3 ______________________________________ Binary vs. Arithmetic Speed Differences Binary Arithmetic Speed Operation Speed Speed Difference/Page ______________________________________ AND 1 1.5 50% OR 1 1.5 50% NOT 1 1 0% XOR 1 2.5 150% ______________________________________
Table 3 shows the increase in processor work for each raster operation on one pixel. When it is realized that there are 33,660,000 pixels in one full-page letter print job, a 50% increase in workload per pixel results in a substantial increase in processor time. Further, most common raster operations utilize 3 to 4 operations to obtain a result. Accordingly, a significant processing penalty results when using arithmetic raster operations.
As a result of the aforesaid processing penalties, the prior art has continued to use binary operators when performing raster operations, even upon multi-bit pixel representations. This results in some alteration in the color or saturation of the resultant image due to the erroneous values that result when using a binary operator on a multi-bit pixel image.
Accordingly, it is an object of this invention to provide a method and apparatus for enabling generation of a high-quality color image representation when performing raster operations on multi-bit pixel values.
It is another object of this invention to provide an improved method and apparatus for performing raster operations on multi-bit pixel images, while minimizing processing penalties and achieving high quality image outputs.